<%@ include file="/inc/header.jsp" %>

      <span class="titrePage">
         <bean:message key="entity.Livret"/> : <bean:write name="LivretForm" property="nom"/>
      </span>
      <br/>
      <br/>
		<script language="JavaScript1.2">
			function reloadAction()
			{
				document.LivretForm[0].action = '<html:rewrite page="/livretAction.do?actionName=Modifier"/>';
				document.LivretForm[0].submit();
			}
		</script>
  <blockquote>

     <common:errors/>
     <common:success/>

     <html:form action="/livretAction" focus="idCategorie">
      <table cellpadding="5" width="40%" cellspacing="0">
     	<html:hidden property="id"/>
     	<html:hidden property="nom"/>
           <tr>
              <td width="30%" align="right">
                 <span class="label">
                    <bean:message key="field.categorie"/>
                 </span>
              </td>
              <td width="70%">
		           <teachertools:category onchange="reloadAction();" />
              </td>
           </tr>
           <tr>
              <td align="right">
                 <span class="label">
                    <bean:message key="field.matiere"/>
                 </span>
              </td>
              <td>
		           <teachertools:matiere onchange="reloadAction();" />
              </td>
           </tr>
               <tr>
                  <td align="right">
                     <span class="label">
                        <bean:message key="field.competence"/>
                     </span>
                  </td>
                  <td>
	           		<teachertools:competence bean="competenceIds" lines="10" multiple="true" />
                  </td>
               </tr>
           <tr>
              <td colspan="2">&nbsp;</td>
           </tr>
           <tr>
              <td><input value="<bean:message key="button.save"/>" type="submit" name="actionName"/></td>
              <td><teachertools:cancelButton /></td>
           </tr>
           <tr>
              <td colspan="2">&nbsp;</td>
           </tr>
           <tr>
              <td colspan="2"><hr/></td>
           </tr>
        </table>
		</html:form>
        <br/>
	    <html:form action="/livretAction">
	     	<html:hidden property="id"/>
	    <center>
         <display:table name="COMPETENCE_LIST" id="competence" pagesize="20" class="dtable" requestURI="/livretAction.do?actionName=Modifier">
			<display:column class="id" title="<input type='checkbox' name='allbox' onclick='invertCheckboxStatus(\"competenceIds\", this.form.allbox.checked)' style='margin: 0 0 0 4px' />">
				<input type="checkbox" name="competenceIds" value="${competence.id}" />
			</display:column>
			<display:column property="categorie.nom" class="shorttext" titleKey="field.categorie" sortable="true" />
			<display:column property="matiere.nom" class="shorttext" titleKey="field.matiere" sortable="true" />
			<display:column property="nom" class="alignLeft" titleKey="field.nom" sortable="true" />
         </display:table>
<!--	        <table border="0" width="75%">-->
<!--	           <tr>-->
<!--	           		<th>&nbsp;</th>-->
<!--	           		<th><bean:message key="field.categorie"/></th>-->
<!--					<th><bean:message key="field.matiere"/></th>-->
<!--	           		<th><bean:message key="field.nom"/></th>-->
<!--	           </tr>-->
<!--	            <logic:present name="COMPETENCE_LIST">-->
<!--	            <logic:iterate id="current" name="COMPETENCE_LIST">-->
<!--	           <tr>-->
<!--		            <td><input type="checkbox" name="competenceIds" value="<bean:write name="current" property="id"/>"/></td>-->
<!--	           		<td><bean:write name="current" property="categorie"/></td>-->
<!--					<td><bean:write name="current" property="matiere"/></td>-->
<!--	           		<td><bean:write name="current" property="nom"/></td>-->
<!--	           </tr>-->
<!--	            </logic:iterate>-->
<!--	            </logic:present>-->
<!--	           <tr>-->
<!--	              <td colspan="4">&nbsp;</td>-->
<!--	           </tr>-->
<!--	           <tr>-->
<!--	              <td colspan="4">-->
						<br/><input value="<bean:message key="button.deleteCompetence"/>" type="submit" name="actionName"/>
<!--				  </td>-->
<!--	           </tr>-->
<!--	        </table>-->
	    </center>
		</html:form>
  </blockquote>
<%@ include file="/inc/footer.jsp" %>
